#{extends 'main.html' /} 
#{set title:'Pacientes' /}

<div class="row">
	<div class="span12">

		<div>
		
			#{if !pacientes.empty}
		
			<table class="table table-striped table-bordered table-condensed">
				<thead>
					<tr>
						<th>Nome</th>
						<th>Login</th>
						<th>Endereço</th>
						<th>Telefone</th>
						<th>Celular</th>
						<th>Ações</th>
					</tr>
				</thead>
				<tbody>
					#{list items:pacientes, as: 'paciente'}
					<tr>
						<td>${paciente.nome}</td>
						<td>${paciente.login}</td>						
						<td>${paciente.endereco}</td>
						<td>${paciente.telefone}</td>
						<td>${paciente.celular}</td>
						<td><a href="@{pacientes.show(paciente.id)}"
							class="icon-folder-open"></a>
							<a href="@{pacientes.delete(paciente.id)}"
							class="icon-remove"  onclick="return confirm('Confirma?')"></a>
					</tr>
					#{/list}
				</tbody>
			</table>
			
			#{/if}
			
		</div>


		<div id="actions">
			<a href="@{Pacientes.create}" class="btn btn-success"><i class="icon-white icon-plus"></i></a>
		</div>
		
	</div>
</div>